/**********************************************************************************************/
// dgt_AlgAction.h
//
// Common Lib for Digital Studio
// Block of management of algorithm
// Class, which represent Action of algorithm 
//
// Copyright Diamant Group 2008
/**********************************************************************************************/
#ifndef _dgt_AlgAction_h_
#define _dgt_AlgAction_h_

/**********************************************************************************************/
// -------------------------------------------------------------------------------------------//
//                                   Action table											  //
// -------------------------------------------------------------------------------------------//
// 1. Number of block, operation owner										Int				  //
// 2. Name of variable - result												String			  //
// 3. Code of operation														Int				  //
// 4. List of arguments														Array of Strings  //
// 5. Attribute of operation block											Bool			  //
// 6. Name of operation plugin												String			  //
// 7. Code of operation ( in operation element )							Int				  //
/**********************************************************************************************/

#include "dgtKernel.h"
#include "dgt_SmartMacros.h"

SMART_CLASS( dgt_AlgAction );

WX_DECLARE_OBJARRAY( dgt_AlgAction_Ptr, dgt_AlgActArray ); 

/**********************************************************************************************/
/**
* \brief Class, which represent table of actions of algorithm
*/
class dgt_AlgAction
{
	public://///////////////////////////////////////////////////////////////////////////////////

		/**
		* @brief Ctor as default
		*/
		dgt_AlgAction( void )	{};

		/**
		* @brief Ctor 
		* @param inBlock		Number of block, operation owner
		* @param inResult		Name of variable - result
		* @param inOpCode		Code of operation
		* @param inArgList		List of arguments
		* @param inOpAttr		Attribute of operation block 
		* @param inOpPlugName	Name of operation plugin
		* @param inOpElemCode	Code of operation ( in operation element )
		*/
		dgt_AlgAction(	unsigned		inBlock,
						wxString		inResult,
						unsigned		inOpCode,
						wxArrayString	inArgList,
						bool			inOpAttr,
						wxString		inOpPlugName,
						unsigned		inOpElemCode );

		/**
		* @brief Dtor as default
		*/
		~dgt_AlgAction( void ) {};

		/**
		* @brief Function for setting Number of block, operation owner
		* @param inBlock New number of block, operation owner
		*/
		void					set_Block( unsigned inBlock );

		/**
		* @brief Function for getting Number of block, operation owner
		* @return Number of block, operation owner
		*/
		unsigned				get_Block( void );

		/**
		* @brief Function for setting name of variable - result
		* @param inResult Name of variable - result
		*/
		void					set_Result( wxString inResult  );

		/**
		* @brief Function for getting name of variable - result
		* @return Name of variable - result 
		*/
		wxString				get_Result( void );

		/**
		* @brief Function for setting code of operation
		* @param inOpCode new code of operation
		*/
		void					set_OpCode( unsigned inOpCode );

		/**
		* @brief Function for getting code of operation
		* @return Code of operation
		*/
		unsigned				get_OpCode( void );

		/**
		* @brief Function for setting list of arguments
		* @param inArgList new list of arguments
		*/ 
		void					set_ArgList( wxArrayString inArgList );

		/**
		* @brief Function for getting list of arguments
		* @return List of arguments
		*/
		wxArrayString			get_ArgList( void );

		/**
		* @brief Function for setting attribute of operation block 
		* @param inOpAttr New attribute of operation block 
		*/
		void					set_OpAttr( bool inOpAttr );

		/**
		* @brief Function for getting attribute of operation block 
		* @return Attribute of operation block 
		*/
		bool					get_OpAttr( void );

		/**
		* @brief Function for setting name of operation plugin
		* @param inOpPlugName New name of operation plugin
		*/
		void					set_OpPlugName( wxString inOpPlugName );
		
		/**
		* @brief Function for getting name of operation plugin
		* @return Name of operation plugin
		*/
		wxString				get_OpPlugName( void );

		/**
		* @brief Function for setting code of operation ( in operation element )
		* @param inOpElemCode New code of operation ( in operation element )
		*/
		void					set_OpElemCode( unsigned inOpElemCode );

		/**
		* @brief Function for getting code of operation ( in operation element )
		* @return Code of operation ( in operation element )
		*/
		unsigned				get_OpElemCode( void );

	private:////////////////////////////////////////////////////////////////////////////////////

		unsigned				m_Block;			/*!< Number of block, operation owner */

		wxString				m_Result;			/*!< Name of variable - result */

		unsigned				m_OpCode;			/*!< Code of operation */

		wxArrayString			m_ArgList;			/*!< List of arguments	 */

		bool					m_OpAttr;			/*!< Attribute of operation block */

		wxString				m_OpPlugName;		/*!< Name of operation plugin */

		unsigned				m_OpElemCode;		/*!< Code of operation ( in operation element ) */
};


#endif // dgt_AlgAction
